package com.glsc.ngateway.common.base.repo.mysql.opmanage.report.excel;

import com.glsc.ngateway.common.base.domain.mysql.opmanage.report.excel.RiskDailyStockRepoProp;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @author: qiyr
 * @date: 2022/4/25 10:13
 * @description: 风险监测-股票质押回购每日信息（自有资金）访问层
 */
@Repository
public interface RiskDailyStockRepoPropRepo extends JpaRepository<RiskDailyStockRepoProp, Long>, JpaSpecificationExecutor<RiskDailyStockRepoProp> {

    @Query(value = "select max(fl_id) from t_riskdaily_stockrepo_prop", nativeQuery = true)
    public Integer getMaxId();

    @Query(value = "select gl_exchange from t_stockinfo where gl_tradecode = :code", nativeQuery = true)
    public String getMarket(@Param("code") String code);
}
